import request from '@/utils/request';

/**
 * 分组搜索
 * @param data
 * @returns {PromiseLike<T | never> | Promise<T | never> | *}
 */
// 新建分组
export const creatGroup = (data: any) => {
    return request({
        url: '/scrm-api/console/tenant/group/create',
        method: 'post',
        data
    });
};
//更新 分组内容
export const updateGroup = (data: any) => {
    return request({
        url: '/scrm-api/console/tenant/group/update',
        method: 'post',
        data
    });
};
// 删除 分组
export const delGroup = (data: any) => {
    return request({
        url: '/scrm-api/console/tenant/group/destroy',
        method: 'post',
        data
    });
};
//新建敏感词
export const newSensitive = (data: any) => {
    return request({
        url: 'scrm-api/console/riskmonitoring/sensitivethesaurus/add-sensitive-words',
        method: 'post',
        data
    });
};
//删除敏感词数据
export const deleteSensitivelist = (data: any) => {
    return request({
        url: 'scrm-api/console/riskmonitoring/sensitivethesaurus/batch-delete',
        method: 'post',
        data
    });
};
//开启
export const openSensitivelist = (data: any) => {
    return request({
        url: 'scrm-api/console/riskmonitoring/sensitivethesaurus/batch-open',
        method: 'post',
        data
    });
};
//关闭
export const closeSensitivelist = (data: any) => {
    return request({
        url: 'scrm-api/console/riskmonitoring/sensitivethesaurus/batch-close',
        method: 'post',
        data
    });
};

//获取门店列表
export const getSensitivelist = (data: any) => {
    return request({
        url: 'scrm-api/console/work/store/list',
        method: 'post',
        data
    });
};
// 批量操作门店
export const getStogeChange = (data: any) => {
    return request({
        url: '/scrm-api/console/work/store/change',
        method: 'POST',
        data
    });
};
// 批量操作门店
export const getStogeChange1 = (data: any) => {
    return request({
        url: '/scrm-api/console/work/store/change',
        method: 'POST',
        data,
        noNeedLoading: true
    });
};
//获取 分组列表
export const getGroupList = (data: any) => {
    return request({
        url: '/scrm-api/console/tenant/group/getLists',
        method: 'get',
        params: data
    });
};
// 批量下载或下载
export const getStogeDownload = (data: any) => {
    return request({
        url: '/scrm-api/console/work/store/download',
        method: 'POST',
        data
    });
};
// 删除
export const getStogeDel = (data: any) => {
    return request({
        url: '/scrm-api/console/work/store/del',
        method: 'POST',
        data,
        noNeedLoading: true
    });
};
//下载模板
export const getdownloadtemp = (data: any) => {
    return request({
        url: '/scrm-api/console/work/store/download-template',
        method: 'GET',
        params: data
    });
};
//导入模板
export const getdownimport = (data: any) => {
    return request({
        url: '/scrm-api/console/work/store/import',
        method: 'POST',
        data
    });
};
//导入记录
export const getdownimportrecord = (data: any) => {
    return request({
        url: '/scrm-api/console/work/store/import-record',
        method: 'POST',
        data
    });
};
//导出导入记录
export const getimportrecordexport = (data: any) => {
    return request({
        url: '/scrm-api/console/work/store/import-record-export',
        method: 'POST',
        data
    });
};
//门店员工列表
export const getstafflist = (data: any) => {
    return request({
        url: '/scrm-api/console/work/store/staff-list',
        method: 'POST',
        data
    });
};
//门店员工删除，批量删除
export const getstaffdel = (data: any) => {
    return request({
        url: '/scrm-api/console/work/store/del',
        method: 'POST',
        data
    });
};
//新建门店，编辑门店
export const getstaffsave = (data: any) => {
    return request({
        url: '/scrm-api/console/work/store/save',
        method: 'POST',
        data
    });
};
//编辑数据详情
export const getstaffdetail = (data: any) => {
    return request({
        url: '/scrm-api/console/work/store/detail',
        method: 'GET',
        params: data
    });
};

//批操作门店店员
export const getstaffoperate = (data: any) => {
    return request({
        url: '/scrm-api/console/work/store/staff-operate',
        method: 'POST',
        data
    });
};
//门店分组
export const getLists = (data: any) => {
    return request({
        url: '/scrm-api/console/tenant/group/getLists',
        method: 'GET',
        params: data
    });
};
